<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
			var rightname="fengling";
			var rightpwd="123";
			var rightcode=Math.floor(Math.random()*9000)+1000;
			var inputname=prompt("请输入用户名");
		if(inputname==rightname){
			var inputpwd=prompt("请输入密码");
			if(inputpwd==rightpwd){
				var inputcode=prompt("请输入验证码"+rightcode);
				if(inputcode==rightcode){
				alert("登录成功！")	
				}else{
					alert("你怕是傻，验证码都能输错！");
				}
			}else{
				alert("密码错误！")
			}
		}
		else{
			alert("用户名错误！")
		}
		</script>
	</body>
</html>
